<%@ page language="java" contentType="text/html; charset=UTF-8"  
    pageEncoding="UTF-8"%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
<html>  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
<title>首页</title>  
</head> 
<script type="text/javascript">
	function addOne(){
		var _requestData = {
				"name" : "测试用户2",
				"remark" : "测试备注3",
				"age" : 20
			};
		$.ajax({
			type : "post",
			url : "http://localhost:8080/xpandaframework/sys/sysUser/addOne",
			data : _requestData,
			dataType : "json",
			success : function(json) {

			}
		});
	}
	
	function editOneById(){
		var _requestData = {
				"id" : "915cddf07c5e11e4e177253e5a1f9e5b",
				"name" : "测试用户2####",
				"remark" : "测试备注2#####",
				"age" : 21
			};
		$.ajax({
			type : "post",
			url : "http://localhost:8080/xpandaframework/sys/sysUser/editOneById",
			data : _requestData,
			dataType : "json",
			success : function(json) {

			}
		});
	}
	function searchOneById(){
		var _requestData = {
				"id" : "8c4c25607d2511e416891c129955069c"
			};
		$.ajax({
			type : "post",
			url : "http://localhost:8080/xpandaframework/sys/sysUser/searchOneById",
			data : _requestData,
			dataType : "json",
			success : function(json) {

			}
		});
	}
	function delOneById(){
		var _requestData = {
				"id" : "915cddf07c5e11e4e177253e5a1f9e5b"
			};
		$.ajax({
			type : "post",
			url : "http://localhost:8080/xpandaframework/sys/sysUser/delOneById",
			data : _requestData,
			dataType : "json",
			success : function(json) {

			}
		});
	}
</script> 
<body>  
    <h1>这里是首页，欢迎你！</h1>  
    <%   
        String[] str = session.getValueNames();  
        for(int i=0;i<str.length;i++){  
            out.println("key=="+str[i]);  
            out.println("value=="+session.getAttribute(str[i]));  
        }  
    %>
    <input type="button" onclick="addOne()" value="添加单条数据">
    <input type="button" onclick="editOneById()" value="修改单条数据">
    <input type="button" onclick="searchOneById()" value="根据ID查询单条数据">
    <input type="button" onclick="delOneById()" value="根据ID删除单条数据">
    <script src="resources/js/libs/jquery-1.8.3.min.js"></script>
</body>  
</html>